package com.cj.image.controller;

import com.cj.image.bean.RequestFilePath;
import com.cj.image.service.FileService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("file")
public class FileController {
    @Autowired
    private FileService fileService;

    @PostMapping("/insertImageByFilePath")
    public void  insertImageByFilePath(@RequestBody RequestFilePath requestFilePath) {
        fileService.insertImageByFilePath(requestFilePath.getFilePath());
    }
}
